//
//  MessageModel.m
//  ExcellentHome
//
//  Created by 揭婧雯 on 16/8/1.
//  Copyright © 2016年 陈区. All rights reserved.
//

#import "MessageModel.h"

@implementation MessageModel

+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    id obj = [[self alloc] init];
    [obj setValuesForKeysWithDictionary:dictionary];
    return obj;
}

- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{
}

- (NSString*)description
{
    return [self getDictionaryFromModel].description;
}

- (NSDictionary*)getDictionaryFromModel
{
    NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
    [dict setObject:CHECKVALUE(_messageId) forKey:@"messageId"];
    [dict setObject:CHECKVALUE(_userid) forKey:@"userid"];
    [dict setObject:CHECKVALUE(_usertype) forKey:@"usertype"];
    [dict setObject:CHECKVALUE(_title) forKey:@"title"];
    [dict setObject:CHECKVALUE(_message) forKey:@"message"];
    [dict setObject:CHECKVALUE(_objectid) forKey:@"objectid"];
    [dict setObject:CHECKVALUE(_groupid) forKey:@"groupid"];
    [dict setObject:CHECKVALUE(_sender) forKey:@"sender"];
    [dict setObject:CHECKVALUE(_usericon) forKey:@"usericon"];
    [dict setObject:CHECKVALUE(_businesstype) forKey:@"businesstype"];
    [dict setObject:CHECKVALUE(_type) forKey:@"type"];
    [dict setObject:CHECKVALUE(_createTime) forKey:@"createTime"];
    [dict setObject:CHECKVALUE(_isRead) forKey:@"isRead"];
    [dict setObject:CHECKVALUE(_uuid) forKey:@"uuid"];
    [dict setObject:CHECKVALUE(_isTop) forKey:@"isTop"];
    [dict setObject:CHECKVALUE(_contenttype) forKey:@"contenttype"];
    [dict setObject:CHECKVALUE(_sendUserId) forKey:@"sendUserId"];
    [dict setObject:CHECKVALUE(_sendUserType) forKey:@"sendUserType"];
    [dict setObject:CHECKVALUE(_turnTip) forKey:@"turnTip"];
    [dict setObject:CHECKVALUE(_turnType) forKey:@"turnType"];
    [dict setObject:CHECKVALUE(_communityId) forKey:@"communityId"];
    [dict setObject:CHECKVALUE(_submsg) forKey:@"submsg"];
    [dict setObject:CHECKVALUE(_lable) forKey:@"lable"];
    return dict;
}
@end
